package vo;

import constant.PayTypeConstant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @ClassName PlaceOrderParams
 * @Description 统一下单参数封装
 * @Date 2020/12/7 16:59
 * @Author Rick Jen
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlaceOrderParams implements Serializable {

    /** 订单号. */
    @NotBlank(message = "订单号为空！")
    private String orderId;

    /** 交易金额. */
    @NotNull(message = "交易金额为空！")
    @DecimalMin(value = "0.01", message = "交易金额最少为1分！")
    private BigDecimal amount;

    /** 商品标题. */
    @NotBlank(message = "商品标题为空！")
    private String goodsName;

    /** 交易描述. */
    @NotBlank(message = "交易描述为空！")
    private String transactionDescription;

    /** 交易类型. */
    @NotNull(message = "交易类型为空！")
    private Integer payTypeConstant;

    /** 交易方式. */
    @NotNull(message = "交易方式为空！")
    private Integer payMethodConstant;

    /** . */
    /** . */
    /** . */
}
